<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserModel extends Model
{
    //
    protected $table="users";
    protected $primaryKey="userid";
    protected $fillable=["username","password","sex","address","tel"];
    public $timestamps=false;

    public function getalldata(){

    	return self::all();
    }

    public function add($data){

    	return self::create($data);
    }
    public function findone($id){

    	return self::find($id);
    }
    public function update1($id,$data){

    	return self::find($id)->update($data);
    }
            
}
